package create.singleton;

/**
 * Created by lie on 2017/10/30.
 * 终极解决方案 静态内部类
 */
public class StaticInnerClassDemo {
    private StaticInnerClassDemo(){}

    private static final class InnerClass{
        private static final StaticInnerClassDemo instance = new StaticInnerClassDemo();
    }

    public static StaticInnerClassDemo getInstance(){
        return InnerClass.instance;
    }
}
